<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>bigint类型</title>
</head>
<body>
    <button onclick="funBigInt()">点我一下</button>
</body>
<script>
    function funBigInt(){
        // 字面量赋值
        var a = 314
        var b = 314n
        var  sum = b + 314n

        var  c = BigInt(2578) //不需要使用new

        document.write("a=" + a +",类型是：" + typeof(a) + "<br>")
        document.write("b=" + b + ",其类型是：" + typeof(b) + "<br>")
        document.write("c=" + c + ",其类型是：" + typeof(c) + "<br>")
         document.write("sum=" + sum, + ",其类型是：" + typeof(sum)) //类型是 NaNbigint
    }
</script>
</html>